﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Media.Imaging;

namespace Cinser.Common.Wpf.Controls
{
    public class ImageButton : Button
    {
        Image img;
        public string ContentImage
        {
            get
            {
                return this.ContentImage;
            }
            set
            {
                this.ContentImage = value;
                img = new Image();
                img.Height = 16;
                img.Width = 16;
                img.Source = Cinser.Common.Resources.ImagesHelper.GetImageSourceFromResources(this.ContentImage, Common.Resources.ImagesHelper.ImageSize.none);
                this.Content = img;
            }
        }

        public string ToolTip
        {
            get
            {
                return this.ToolTip;
            }
            set
            {
                this.ToolTip = value;
                ToolTipService.SetToolTip(this, value);
            }
        }

        public ImageButton()
        {

        }
    }
}
